<ion-view title="报修单详情">

    <ion-nav-bar class="bar-dark box-shadow">

    </ion-nav-bar>

    <!--<ion-header-bar class="bar-dark box-shadow">-->
        <!--<h1 class="title">跟进详情</h1>-->
        <!--<a class="button button-clear ion-more" ng-click="openPopover($event);"></a>-->
    <!--</ion-header-bar>-->

    <ion-nav-buttons side="left">
        <button class="button button-icon icon ion-ios-arrow-back" ng-click="back()"></button>
    </ion-nav-buttons>


    <ion-nav-buttons side="right">
        <button class="button button-icon icon ion-more" ng-if="orderDetail.orderStatus==4||orderDetail.orderStatus==3" ng-click="openPopover($event);"></button>
    </ion-nav-buttons>

    <ion-content>


        <ion-refresher
                pulling-text="下拉刷新..."
                on-refresh="doRefresh()">
        </ion-refresher>

        <div ng-if="showloading" style="margin-top:60px; text-align: center">
            <ion-spinner icon="ios" style="height: 60px; width: 60px;;"></ion-spinner>
        </div>



        <div class="list todo_item" style="background-color: #f2f2f6;font-size: 17px">

            <a class="item item-icon-left  item-order-num"  style="color: #adaead;font-size: 18px">
                <i style="padding-left: -20px!important;">订单编号:&nbsp;&nbsp;{{orderDetail.orderNumber}}</i>
                <span class="item-note" style="color: #ef0a14">
                  质保内
                </span>
            </a>

            <a class="item item-avatar" href="#" style="background-color: #f8f8f8;font-size: 18px"   ng-switch="orderDetail.questionOne">
                <img src="img/question_01.png" style="border-radius:0%;max-width:45px;max-height: 45px" ng-switch-when="渗漏">
                <img src="img/question_02.png" style="border-radius:0%;max-width:45px;max-height: 45px" ng-switch-when="户内装修">
                <img src="img/question_03.png" style="border-radius:0%;max-width:45px;max-height: 45px" ng-switch-when="阳台、露台">
                <img src="img/question_04.png" style="border-radius:0%;max-width:45px;max-height: 45px" ng-switch-when="给水">
                <img src="img/question_05.png" style="border-radius:0%;max-width:45px;max-height: 45px" ng-switch-when="排水">
                <img src="img/question_06.png" style="border-radius:0%;max-width:45px;max-height: 45px" ng-switch-when="插座、开关与光源">
                <img src="img/question_07.png" style="border-radius:0%;max-width:45px;max-height: 45px" ng-switch-when="供暖">
                <img src="img/question_08.png" style="border-radius:0%;max-width:45px;max-height: 45px" ng-switch-when="卫浴与小配件">
                <img src="img/question_09.png" style="border-radius:0%;max-width:45px;max-height: 45px" ng-switch-when="阳台门、窗与配件">
                <img src="img/question_10.png" style="border-radius:0%;max-width:45px;max-height: 45px" ng-switch-when="柜体">
                <h2>{{orderDetail.questionOne}}-{{orderDetail.questionTwo}}</h2>
                <p>{{orderDetail.describe}}</p>
            </a>

            <a class="item row" href="#" style="background-color: #ffffff">
              <!--<img src="img/ionic.png" style="height: 100px"  class="col col-25"  ng-click="showBigPic('img/ionic.png')">-->

              <!--<img src="img/ionic.png" style="height: 100px"  class="col col-25">-->

              <!--<img src="img/ionic.png" style="height: 100px"  class="col col-25">-->

              <!--<img src="img/ionic.png" style="height: 100px"  class="col col-25">-->
              <!--<img src="img/ionic.png" style="height: 100px"  class="col col-25">-->

              <img src="{{url}}{{item}}" style="height: 100px"  class="col col-25" ng-repeat="item in img" ng-click="showBigPic('{{url}}{{item}}')">



            </a>

            <a class="item item-icon-left  fontSelf_black" style="color: #adaead">
                <i class="icon ion-ios-clock-outline" style="font-size: large"></i>
                报修时间:
                <i>{{orderDetail.createDate|date:'yyyy-MM-dd HH:mm:ss '}}</i>

            </a>

            <a class="item item-icon-left  fontSelf_black" style="color: #adaead">
                <i class="icon ion-android-car" style="font-size: large"></i>
                期望上门时间:  <i>{{orderDetail.hopeDate}}</i>

            </a>

            <a class="item item-icon-left fontSelf_black "  style="margin-top: 10px;color: #adaead">
                <i class="icon ion-location" style="font-size: x-large"></i>
                {{orderDetail.userName}}
                <span class="item-note item-note-selt">
                    {{orderDetail.userTel}}
                </span>
                <i class="icon ion-ios-telephone icon_tel_self" ng-click="showSheet(orderDetail.userTel)"></i>
                <br>
                <i style="">{{orderDetail.addressDetail}}</i>
            </a>

            <a class="item item-icon-left item-icon-right " ng-if="orderDetail.orderStatus==4" style="color: #999999;font-size: 18px;margin-top: 10px" href="#/node_report/{{orderDetail.orderNumber}}">
                <i class="icon ion-images" style="font-size: large"></i>
                上传节点报告
                <i class="icon ion-ios-arrow-right"></i>

            </a>

            <a class="item item-icon-left "  ng-if="orderDetail.orderStatus==4||orderDetail.orderStatus==7" style="color: #999999;font-size: 18px;margin-top: 10px">
                <i class="icon ion-gear-a" style="font-size: large"></i>
                历史维修记录
            </a>
        </div>



      <!--//维修节点树-->
      <div class="list time-line">

        <a class="item " ng-repeat="node in repairNodes">
          <!--<img src="http://www.avatarsdb.com/avatars/swift_smile.jpg">-->
          <div class="text-time-line" >
            <h2 style="color: #999999">{{node.repairStageContent}}</h2>
            <ul class="list-follower">
              <li><img src="{{url}}{{img}}" alt="" ng-repeat="img in node.repairStageUrls.split(',')"/></li>
              <!--<li><img src="http://images.fanpop.com/images/image_uploads/Adam-adam-levine-775158_100_100.jpg" alt=""/></li>-->
              <!--<li><img src="http://orig01.deviantart.net/48d2/f/2010/001/5/7/g_dragon_icon_1_by_wonderpaper.jpg" alt=""/></li>-->
            </ul>
            <p><i class="ion ion-clock"></i>{{node.stageDate|date:'yyyy-MM-dd HH:mm:ss '}}</p>
          </div>

          <div class="dot-time-line positive-bg"></div>

        </a>
        <!--<a class="item ">-->
          <!--&lt;!&ndash;<img src="http://static.dnaindia.com/sites/default/files/styles/thumbnail/public/2015/09/29/380501-361193-harry-potter-high-definition-wallpapers-lovely-desktop-background-images-widescreen.jpg?itok=zRlW356Z">&ndash;&gt;-->
          <!--<div class="text-time-line">-->
            <!--<h2>Harry Potter <span>comments</span> your post</h2>-->
            <!--<p><i class="ion ion-clock"></i> 7 minutes ago</p>-->
          <!--</div>-->
          <!--<div class="dot-time-line assertive-bg"></div>-->
        <!--</a>-->
        <!--<a class="item ">-->
          <!--&lt;!&ndash;<img src="http://www.avatarsdb.com/avatars/cute_selena_gomez.jpg">&ndash;&gt;-->
          <!--<div class="text-time-line">-->
            <!--<h2>Selena Gomez <span>Followed</span> 3 people</h2>-->
            <!--<ul class="list-follower">-->
              <!--<li><img src="http://www.picgifs.com/avatars/celebrities/justin-bieber/avatars-justin-bieber-990310.jpg" alt=""/></li>-->
              <!--<li><img src="http://images.fanpop.com/images/image_uploads/Adam-adam-levine-775158_100_100.jpg" alt=""/></li>-->
              <!--<li><img src="http://orig01.deviantart.net/48d2/f/2010/001/5/7/g_dragon_icon_1_by_wonderpaper.jpg" alt=""/></li>-->
            <!--</ul>-->
            <!--<p><i class="ion ion-clock"></i> 7 minutes ago</p>-->
          <!--</div>-->
          <!--<div class="dot-time-line calm-bg"></div>-->
        <!--</a>-->
        <!--<a class="item ">-->
          <!--&lt;!&ndash;<img src="http://images6.fanpop.com/image/photos/32900000/-Adele-adele-32952362-100-100.png">&ndash;&gt;-->
          <!--<div class="text-time-line">-->
            <!--<h2>Adele <span>added</span> 1 photo</h2>-->
            <!--<p><i class="ion ion-clock"></i> 7 minutes ago</p>-->
            <!--<img src="http://file.vforum.vn/hinh/2014/6/hinh-nen-may-tinh-hd-thien-nhien-9.jpg" alt="" class="img-responsive padding-10-0"/>-->
          <!--</div>-->
          <!--<div class="dot-time-line royal-bg"></div>-->
        <!--</a>-->
      </div>

      <br>
      <br>
      <br>






        <ion-infinite-scroll   on-infinite="loadMore()"  distance="1%" ng-if="hasNextPage()">        </ion-infinite-scroll>

    </ion-content>

    <div class="bar bar-footer bar-positive">
        <div class="title" ng-if="orderDetail.orderStatus==3" ng-click="startRepair(orderDetail.id)">开始维修</div>
        <div class="title" ng-if="orderDetail.orderStatus==4">维修中</div>
        <div class="title" ng-if="orderDetail.orderStatus==7">异常件</div>
        <div class="title" ng-if="orderDetail.orderStatus==8||orderDetail.orderStatus==9">已结束</div>
        <div class="title" ng-if="orderDetail.orderStatus==5">待评价</div>
        <div class="title" ng-if="orderDetail.orderStatus==6">转单中</div>
    </div>

    <!--//显示图片-->
    <script id="modal_follw.html" type="text/ng-template">
      <div class="modal">
        <ion-header-bar class="bar bar-header bar-dark" style="background-color: #0e0e1c">
          <!--<h1 class="title">1/4</h1>-->
          <!--<button class="button  button-clear ion-trash-a" ng-click="modal.hide()"></button>-->
        </ion-header-bar>
        <ion-content style="background-color: #0e0e1c" ng-click="modal.hide()">
          <div class="card_self">
            <img src={{modal.src}} class="show_img_self">
            <!--<img src="img/jgxLogo.png" class="show_img_self">-->
            <!--{{modal.src}}-->
          </div>
        </ion-content>
      </div>
    </script>

</ion-view>

<script id="ez-popover.html" type="text/ng-template">
    <ion-popover-view class="dark-bg light padding">

        <button class="button button-clear icon-left ion-arrow-swap popbutton_self popbutton_self1" style="color: #ffffff;margin-top: 3px" ng-click="showConfirm()">&nbsp;&nbsp;转单</button>
        <br><hr class="hr_self">
        <button class="button button-clear icon-left ion-compose  popbutton_self" style="color: #ffffff" ng-click="report()">&nbsp;&nbsp;上报</button>
        <br><hr class="hr_self">
        <button class="button button-clear icon-left ion-hammer  popbutton_self" style="color: #ffffff" ng-click="finishConfirm()">&nbsp;&nbsp;结束</button>
        <!--<a class="button button-clear"  ng-click="closePopover($event);">点此关闭</a>-->
    </ion-popover-view>
</script>








